package DigiJoe;

public class Coordinate {
    
    //point
    private int x, y;

    //constructor
    public Coordinate(int X, int Y){
        x = X;
        y = Y;
    }
    
    //add method
    public Coordinate add(Coordinate other)
    {
        Coordinate temp = new Coordinate(x+other.x, y+other.y);
        return temp;
    }
    
    //subtract method
    public Coordinate subtract(Coordinate other)
    {
        Coordinate temp = new Coordinate(x-other.x, y-other.y);
        return temp;
    }

    //getters setters
    public int getX() { return x; }
    public int getY() { return y; }
    public void setX(int X) { x = X; }
    public void setY(int Y) { y = Y; }
}
